package com.qidian.buy.product.controller;

import com.qidian.buy.product.service.IItemCatService;
import com.qidian.buy.util.pojo.BuyResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 商品类目 前端控制器
 * </p>
 *
 * @author 戴着假发的程序员
 * @since 2023-07-05
 */
@RestController
@CrossOrigin
@RequestMapping("/buy/itemCat")
public class ItemCatController {
    @Autowired
    private IItemCatService itemCatService;
    @GetMapping("/queryByParentId")
    public BuyResult queryByParentId(Long parentId){
        return itemCatService.queryByParentId(parentId);
    }
}
